package ru.develbureau.client.view;

import java.util.Date;

import ru.develbureau.client.model.ClientRequest;

import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;

public class RowPanel extends HorizontalPanel {
	private static final DateTimeFormat dtf = DateTimeFormat.getFormat("HH.mm.ss");
	private ClientRequest clientRequest;
	
	public RowPanel(){
		super();
	}
	
	public RowPanel(ClientRequest cliReq){
		this();
		clientRequest = cliReq;
		clientRequest.setPublishDate(new Date());
		this.add(new HTML(dtf.format(clientRequest.getPublishDate())));
		this.add(new HTML(clientRequest.getSource()));
		this.add(new HTML(clientRequest.getTarget()));
		this.add(new HTML(clientRequest.getTime()));
	}
	
}
